import java.util.Arrays;

public class oddEvenSort {
    public static void main(String[] args) {

        int[] arr = {1, 2, 3, 4, 5, 6};
        oddEvenSort(arr);
    }

           public static  void oddEvenSort(int[] arr){
        for(int i=0;i< arr.length-1;i++){
            for(int j=0;j< arr.length-i-1;j++){
                if((arr[j]%2==0)&&(arr[j+1]!=0)){
                    int t=arr[j];
                    arr[j]=arr[j+1];
                    arr[j+1]=t;
                }
            }
        }
               System.out.println(Arrays.toString(arr));
    }
}
